﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace BAASearchLib
{
    class TxtToText
    {
        private string filePath;
        public TxtToText(string filePath)
        {
            this.filePath = filePath;
        }

        public string ExtractText()
        {
            TextReader tr = new StreamReader(filePath);
            try
            {
                // read all lines of text
                return (tr.ReadToEnd());
            }
            catch (Exception)
            {
                throw new ArgumentException();
            }
            finally
            {
                // close the stream
                tr.Close();
            }
        }

        public string GetAuthor()
        {
            return "";
        }
    }
}
